package com.hui.service;

import com.hui.dao.WareHouseDao;
import com.hui.entity.WareHouse;
import com.hui.mapper.WareHouseMapper;
import com.hui.util.DruidUtil;

import java.util.List;

/**
 * @Description
 * @date 2023/2/11 8:52
 */
public class WareHouseService {

    WareHouseDao dao = new WareHouseDao();

    /**
     * 查询仓库数据
     **/
    public List<WareHouse> getWareHouseAll() {
        return dao.findWareHouseAll();
    }

    /**
     * 新增仓库数据
     **/
    public void addWareHouse(WareHouse wareHouse) {
        dao.insertWareHouse(wareHouse);
    }

    /**
     * 删除仓库数据
     **/
    public void delWareHouseById(int id) {
        dao.delWareHouseById(id);
    }

    /**
     * 根据id查询数据
     **/
    public WareHouse findWareHouseById(int id) {
        return dao.findWareHouseById(id);
    }

    /**
     * 修改数据
     **/
    public void updateWareHouseById(WareHouse wareHouse) {
        dao.updateWareHouseById(wareHouse);
    }

}
